home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.006 / xemacs-1 / lib / xemacs-19.13 / info / xemacs-faq.info-1 < prev    next >
Encoding:
GNU Info File  |  1995-09-01  |  48.9 KB  |  1,243 lines

  1. This is Info file ../info/xemacs-faq.info, produced by Makeinfo-1.63
  2. from the input file xemacs-faq.texi.
  3.  
  4. 
  5. File: xemacs-faq.info,  Node: Top,  Next: 1. Introductory Questions,  Prev: (dir),  Up: (dir)
  6.  
  7. XEmacs FAQ
  8. **********
  9.  
  10.    Version:  1995/08/29
  11.  
  12.    Current-Editor: Chuck Thompson <cthomp@cs.uiuc.edu>
  13.  
  14.    Copying Status: Freely Redistributable.  I take no liability for the
  15.                correctness and safety of any procedures or advice given
  16.                here.  This FAQ is distributed in the hope that it will
  17.                be useful, but WITHOUT ANY WARRANTY; without even the
  18.              implied warranty of MERCHANTABILITY or FITNESS FOR A
  19.           PARTICULAR PURPOSE.
  20.  
  21.    This is a list of frequently asked questions for XEmacs users and
  22. maintainers.
  23.  
  24.    You can obtain the latest version of this file by anonymous FTP from
  25. site `ftp.cs.uiuc.edu:/pub/xemacs/faq/xemacs-faq.FORMAT' where FORMAT
  26. is text, texinfo (the master copy), postscript, dvi, html, info.  Note
  27. that the html version has 2 files.
  28.  
  29.    Thanks to the many who contributed, especially to JWZ
  30. <jwz@netscape.com> for starting this whole wonderful mess...  Special
  31. thanks to Tim Geisler <tmgeisle@faui80.informatik.uni-erlangen.de> for
  32. the initial texinfo version and to Giacomo Boffi
  33. <sboff@hp735.stru.polimi.it> for the initial HTML version.  Other
  34. contributors (many left out, unfortunately, due to an old mail-purge)
  35. include:
  36.    * Juergen Nickelsen <nickel@prz.tu-berlin.de>
  37.  
  38.    * Evelyn Ginsparg <ginsparg@adra.com>
  39.  
  40.    * d3h554@foghorn.pnl.gov
  41.  
  42.    * Marty Hall <hall@aplcenmp.apl.jhu.edu>
  43.  
  44.    * Richard Caley <rjc@cogsci.ed.ac.uk>
  45.  
  46.    * fcg@philabs.Philips.COM
  47.  
  48.    * Stig <stig@hackvan.com>
  49.  
  50.    * Arup Mukherjee <arup+@cmu.edu>
  51.  
  52.    * Kevin R. Powell <powell@csl.ncsa.uiuc.edu>
  53.  
  54.    * Eric Eide <eeide@cs.utah.edu>
  55.  
  56.    * William G. Dubuque <wgd@martigny.ai.mit.edu>
  57.  
  58.    * Chris Flatters <cflatter@nrao.edu>
  59.  
  60.    * John A. Turner <turner@lanl.gov>
  61.  
  62. * Menu:
  63.  
  64. * top::                         XEmacs FAQ
  65. * 1. Introductory Questions::.
  66. * 2. Compiling XEmacs::.
  67. * 3. Problems running XEmacs / weird messages::.
  68. * 4. Customization - Emacs Lisp and the .emacs file::.
  69. * 5. Customization - X resources::.
  70. * 6. Changing textual fonts and colors::.
  71. * 7. The modeline::.
  72. * 8. The keyboard::.
  73. * 9. The cursor::.
  74. * 10. The mouse; cutting and pasting::.
  75. * 11. Highlighting::.
  76. * 12. The menubar and toolbar::.
  77. * 13. Scrollbars::.
  78. * 14. Frame Geometry::.
  79. * 15. Window/icon title; window manager problems::.
  80. * 16. Editing source code (C mode; Lisp mode; etc.)::.
  81. * 17. Text mode::.
  82. * 18. Shell mode::.
  83. * 19. Mail; VM; GNUS; BBDB; and related::.
  84. * 20. Printing::.
  85. * 21. Gnuserv::.
  86. * 22. Miscellaneous::.
  87.  
  88. 
  89. File: xemacs-faq.info,  Node: 1. Introductory Questions,  Next: 2. Compiling XEmacs,  Prev: Top,  Up: Top
  90.  
  91. 1. Introductory Questions
  92. *************************
  93.  
  94. * Menu:
  95.  
  96. * 1.1.::          1.1. Preface
  97. * 1.2.::          1.2. What is XEmacs?
  98. * 1.3.::          1.3. What is the current version of XEmacs?
  99. * 1.4.::          1.4. Where can I find it?
  100. * 1.5.::          1.5. Why another version of Emacs?
  101. * 1.6.::          1.6. What do `M-x', GNU, etc. mean?
  102. * 1.7.::          1.7. Where can I get help for using XEmacs?
  103. * 1.8.::          1.8. Where is the mailing list archived?
  104. * 1.9.::          1.9. What is InfoDock, how does it relate to XEmacs, and how can I obtain it?
  105.  
  106. 
  107. File: xemacs-faq.info,  Node: 1.1.,  Next: 1.2.,  Up: 1. Introductory Questions
  108.  
  109. 1.1. Preface
  110. ============
  111.  
  112.    This is the introduction to a list of frequently asked questions
  113. (FAQ's) about XEmacs with answers.  This article contains a listing of
  114. the questions; subsequent articles contain the questions and answers.
  115.  
  116.    This is not a substitute for general Emacs questions, and actually
  117. includes nothing that might help a novice learn to use Emacs or XEmacs.
  118. For that, check out the regular Emacs lists, the tutorial inside of
  119. XEmacs (look on the Help menu), or the O'Reilly book `Learning GNU
  120. Emacs'.  This FAQ focuses on specific issues regarding XEmacs.  If you
  121. don't find the answer here, perhaps it really is a more general
  122. question, and check the GNU Emacs FAQ for more information, as well.
  123.  
  124.    The FAQ list is posted to reduce the noise level in the
  125. `comp.emacs.xemacs' newsgroup which results from the repetition of
  126. frequently asked questions, wrong answers to these questions,
  127. corrections to the wrong answers, corrections to the corrections,
  128. debate, name calling, etc.  Also, it serves as a repository of the
  129. canonical "best" answers to these questions.  However, if you know a
  130. better answer or even a slight change that improves an answer, please
  131. tell me!
  132.  
  133.    If you know the answer of a question is in the FAQ list, please
  134. reply to the question by e-mail instead of posting.  Help reduce noise!
  135.  
  136.    Please suggest new questions, answers, wording changes, deletions,
  137. etc.  The most helpful form for suggestions is a context diff (i.e. the
  138. output of `diff -c').  Include `FAQ' in the subject of messages sent to
  139. us about the FAQ list.
  140.  
  141.    Please do not send questions to us just because you do not want to
  142. disturb a lot of people and you think we would know the answer.  We do
  143. not have time to answer questions individually and keep up with
  144. everything else we have to get done.
  145.  
  146.    Many thanks need to go to all contributors on the old
  147. alt.lucid-emacs.* and current comp.emacs.xemacs groups.  This would
  148. never have been collected without you.
  149.  
  150.    Any directories given are usually in reference to the base directory
  151. formed by unpacking XEmacs.
  152.  
  153. 
  154. File: xemacs-faq.info,  Node: 1.2.,  Next: 1.3.,  Prev: 1.1.,  Up: 1. Introductory Questions
  155.  
  156. 1.2. What is XEmacs?
  157. ====================
  158.  
  159.    An alternative to GNU Emacs, originally based on an early alpha
  160. version of FSF's version 19.  XEmacs was known as Lucid Emacs through
  161. version 19.10.  Almost all features of GNU Emacs are supported in
  162. XEmacs (the ones that aren't supported are generally implemented in a
  163. better way in XEmacs).  The maintainers of XEmacs actively track
  164. changes to GNU Emacs while also working to add new features never
  165. before seen in Emacs.
  166.  
  167. 
  168. File: xemacs-faq.info,  Node: 1.3.,  Next: 1.4.,  Prev: 1.2.,  Up: 1. Introductory Questions
  169.  
  170. 1.3. What is the current version of XEmacs?
  171. ===========================================
  172.  
  173.    The current version is 19.13, released on September 1, 1995.
  174.  
  175. 
  176. File: xemacs-faq.info,  Node: 1.4.,  Next: 1.5.,  Prev: 1.3.,  Up: 1. Introductory Questions
  177.  
  178. 1.4. Where can I find it?
  179. =========================
  180.  
  181.    The canonical source and binaries is found via anonymous FTP at
  182. `ftp.cs.uiuc.edu:/pub/xemacs'.
  183.  
  184. 
  185. File: xemacs-faq.info,  Node: 1.5.,  Next: 1.6.,  Prev: 1.4.,  Up: 1. Introductory Questions
  186.  
  187. 1.5. Why Another Version of Emacs?
  188. ==================================
  189.  
  190.    For a detailed description of the differences between GNU Emacs and
  191. XEmacs, and a detailed history of XEmacs, see the file `etc/NEWS' in
  192. the source distribution.  However, here is a list of some of the
  193. reasons why we think you might consider using it:
  194.  
  195.    * It looks nicer
  196.  
  197.    * The XEmacs maintainers are generally more receptive to suggestions
  198.      than the GNU Emacs maintainers
  199.  
  200.    * Many more bundled packages than GNU Emacs, all properly integrated
  201.      with XEmacs
  202.  
  203.    * Binaries are available for many common operating systems
  204.  
  205.    * Face support on TTY's
  206.  
  207.    * A built-in toolbar
  208.  
  209.    * Better Motif compliance
  210.  
  211.    * Some internationalization support (full MULE support starting with
  212.      19.14)
  213.  
  214.    * Variable-width fonts
  215.  
  216.    * Variable-height lines
  217.  
  218.    * Marginal annotations
  219.  
  220.    * ToolTalk support
  221.  
  222.    * XEmacs can be used as an Xt widget, and can be embedded within
  223.      another application
  224.  
  225.    * Horizontal and vertical scrollbars (using real toolkit scrollbars)
  226.  
  227.    * Better APIs (and performance) for attaching fonts, colors, and
  228.      other properties to text
  229.  
  230.    * The ability to embed arbitrary graphics in a buffer
  231.  
  232.    * Completely compatible (at the C level) with the Xt-based toolkits
  233.  
  234. 
  235. File: xemacs-faq.info,  Node: 1.6.,  Next: 1.7.,  Prev: 1.5.,  Up: 1. Introductory Questions
  236.  
  237. 1.6. What do `M-x', GNU, etc. mean?
  238. ===================================
  239.  
  240.    This is really a general Emacs question, but a table of some common
  241. terms/acronyms is provided here for your convenience.  See the `GNU
  242. Emacs FAQ' for a more complete list.
  243.  
  244. `BLAT FOOP'
  245.      Historical XEmacs error message
  246.  
  247. `C-x'
  248.      "C-x" means that the Control key and the X key should be pressed
  249.      together, like when you use the Shift key.
  250.  
  251. `E-Lisp'
  252.      Same as "Emacs-Lisp".
  253.  
  254. `Emacs-Lisp'
  255.      The dialect of Lisp supported by Emacs and XEmacs.  You use this to
  256.      customize XEmacs.
  257.  
  258. `FAQ'
  259.      Frequently asked question(s).
  260.  
  261. `FSF'
  262.      The Free Software Foundation.
  263.  
  264. `GNU'
  265.      "GNU" refers to products written by the Free Software Foundation.
  266.  
  267. `JWZ'
  268.      Jamie Zawinski <jwz@netscape.com>, the former maintainer of Lucid
  269.      Emacs (which XEmacs evolved from).
  270.  
  271. `M-x'
  272.      "M-x" means that the Meta key and the X key should be pressed
  273.      together, like when you use the Shift key.  Sometimes the Meta key
  274.      is labelled `Alt' or with a diamond.  Some keyboards don't have a
  275.      Meta key at all; then you can get the equivalent by typing the Esc
  276.      key followed by the X key.
  277.  
  278. `RMS'
  279.      Richard Stallman <rms@gnu.ai.mit.edu>, the author of GNU Emacs.
  280.  
  281. `VI'
  282.      An editor used by those heretics that don't subscribe to the Emacs
  283.      religion.
  284.  
  285. 
  286. File: xemacs-faq.info,  Node: 1.7.,  Next: 1.8.,  Prev: 1.6.,  Up: 1. Introductory Questions
  287.  
  288. 1.7. Where can I get help for using XEmacs?
  289. ===========================================
  290.  
  291.    Probably the easiest way, if everything is installed, is to use
  292. info, by pressing `C-h i', or selecting `Emacs Info' from the Help Menu.
  293. Also, `M-x apropos' will look for commands for you.
  294.  
  295.    Try reading this FAQ, examining the regular GNU Emacs FAQ (which can
  296. be found with the Emacs 19 distribution) as well as at
  297. `http://www.eecs.nwu.edu/emacs/faq/' and reading the Usenet group
  298. `comp.emacs.xemacs'.  If that does not help, try posting your question
  299. to `comp.emacs.xemacs'.  If you cannot post or read Usenet news, there
  300. is a corresponding mailing list which is available.  It can be
  301. subscribed to by sending mail to
  302.  
  303.      xemacs-request@cs.uiuc.edu
  304.  
  305.    for subscription information and
  306.  
  307.      xemacs@cs.uiuc.edu
  308.  
  309.    to send messages to the list.
  310.  
  311.    To cancel a subscription, YOU MUST use the xemacs-request address.
  312.  
  313.    Bug reports should be sent to the same locations.
  314.  
  315. 
  316. File: xemacs-faq.info,  Node: 1.8.,  Next: 1.9.,  Prev: 1.7.,  Up: 1. Introductory Questions
  317.  
  318. 1.8. Where is the mailing list archived?
  319. ========================================
  320.  
  321.    The mailing list is archived in the directory
  322. `ftp.cs.uiuc.edu:/pub/xemacs/mlists/'.
  323.  
  324. 
  325. File: xemacs-faq.info,  Node: 1.9.,  Prev: 1.8.,  Up: 1. Introductory Questions
  326.  
  327. 1.9. What is InfoDock, how does it relate to XEmacs, and how can I obtain it?
  328. =============================================================================
  329.  
  330.    InfoDock is an integrated productivity toolset, mainly aimed at
  331. technical people.  It is built atop the XEmacs variant of GNU Emacs and
  332. so has all of the power of Emacs, but with an easier to use and more
  333. comprehensive menu-based user interface.  The next section describes how
  334. it differs from XEmacs and GNU Emacs from the Free Software Foundation.
  335.  
  336.    The quickest way to get a feel for InfoDock is to browse the InfoDock
  337. Manual, especially the section on tools.  This will help you decide
  338. whether or not to download InfoDock for local use.  This manual is
  339. available in gzipped Postscript form, alongside the InfoDock
  340. distribution.  (See below for FTP retrieval instructions.)
  341.  
  342.    InfoDock is aimed at people who want a free, turn-key productivity
  343. environment.  Although InfoDock is customizable, it is not intended for
  344. people who like basic versions of Emacs which need to be customized
  345. extensively for local use; standard Emacs distributions are better for
  346. such uses.  InfoDock is for those people who want a complete,
  347. pre-customized environment in one package, which they need not touch
  348. more than once or twice a year to update to new revisions.
  349.  
  350.    InfoDock is pre-built for SPARCstations running SunOS V4 or V5
  351. (Solaris).  It is intended for use on a color display, although most
  352. features will work on monochrome monitors.  Simply unpack InfoDock
  353. according to the instructions in the ID-INSTALL file and you are ready
  354. to run.
  355.  
  356.    The InfoDock Manual is concise, yet sufficient as a user guide for
  357. users who have never used an Emacs-type editor before.  For users who
  358. are already familiar with Emacs, it supplements the information in the
  359. GNU Emacs Manual.
  360.  
  361.    InfoDock menus are much more extensive and more mature than standard
  362. Emacs menus.  Each menu offers a `Manual' item which displays
  363. documentation associated with the menu's functions.
  364.  
  365.    Three types of menubars are provided:
  366.   1. An extensive menubar providing access to global InfoDock commands.
  367.  
  368.   2. Mode-specific menubars tailored to the current major mode.
  369.  
  370.   3. A simple menubar for basic editing to help novices get started
  371.      with InfoDock.
  372.  
  373.    Most modes also include mode-specific popup menus.  Additionally,
  374. region and rectangle popup menus are included.
  375.    * `Hyperbole', the everyday information manager, is a core part of
  376.      InfoDock.  This provides context-sensitive mouse keys, a
  377.      rolodex-type contact manager, programmable hypertext buttons, and
  378.      an autonumbered outliner with embedded hyperlink anchors.
  379.  
  380.    * `PIEmail', the prototype Personalized Information Environment Mail
  381.      Tool, is included.
  382.  
  383.    * The `OO-Browser', a multi-language object-oriented code browser,
  384.      is a standard part of InfoDock.
  385.  
  386.    InfoDock saves a more extensive set of user options than other Emacs
  387. versions.
  388.  
  389.    InfoDock inserts a useful file header in many file types, showing the
  390. author, summary, and last modification time of each file.  A summary
  391. program can then be used to summarize all of the files in a directory,
  392. for easy MANIFEST file creation.
  393.  
  394.    Your working set of buffers is automatically saved and restored (if
  395. you answer yes to a prompt) between InfoDock sessions.
  396.  
  397.    Refined color choices for code highlighting are provided for both
  398. dark and light background display frames.
  399.  
  400.    The `C-z' key prefix performs frame-based commands which parallel the
  401. `C-x' key prefix for window-based commands.
  402.  
  403.    The Smart Menu system is included for producing command menus on dumb
  404. terminals. (InfoDock does not yet run on dumb terminals but will in
  405. 1995.)
  406.  
  407.    Lisp libraries are better categorized according to function.
  408.  
  409.    Extensions and improvements to many areas of Emacs are included,
  410. such as: paragraph filling, mail reading with Rmail, shell handling,
  411. outlining, code highlighting and browsing, and man page browsing.
  412.  
  413.    InfoDock questions, answers and discussion should go to the mail list
  414. `infodock@hub.ucsb.edu'.  Use `infodock-request@hub.ucsb.edu' to be
  415. added or removed from the list.  Always include your InfoDock version
  416. number when sending help requests.
  417.  
  418.    InfoDock is available across the Internet via anonymous FTP.  To get
  419. it, first move to a directory into which you want the InfoDock archive
  420. files placed.  We will call this <DIST-DIR>.
  421.  
  422.         cd <DIST-DIR>
  423.  
  424.    FTP to ftp.cs.uiuc.edu  (Internet Host ID = 128.174.252.1):
  425.  
  426.         prompt> ftp ftp.cs.uiuc.edu
  427.  
  428.    Login as `anonymous' with your own <user-id>@<site-name> as a
  429. password.
  430.  
  431.         Name (ftp.cs.uiuc.edu): anonymous
  432.         331 Guest login ok, send your complete e-mail address as password.
  433.         Password: -<your-user-id@your-domain>
  434.         230 Guest login ok, access restrictions apply.
  435.  
  436.    Move to the location of the InfoDock archives:
  437.  
  438.         ftp> cd pub/xemacs/infodock
  439.  
  440.    Set your transfer mode to binary:
  441.  
  442.         ftp> bin
  443.         200 Type set to I.
  444.  
  445.    Turn off prompting:
  446.  
  447.         ftp> prompt
  448.         Interactive mode off.
  449.  
  450.    Retrieve the InfoDock archives that you want, either by using a `get
  451. <file>' for each file you want or by using the following to get a
  452. complete distribution, including all binaries:
  453.  
  454.         ftp> mget ID-INSTALL
  455.         ftp> mget id-*
  456.  
  457.    Close the FTP connection:
  458.  
  459.         ftp> quit
  460.         221 Goodbye.
  461.  
  462.    Read the `ID-INSTALL' file which you just retrieved for step-by-step
  463. installation instructions.
  464.  
  465. 
  466. File: xemacs-faq.info,  Node: 2. Compiling XEmacs,  Next: 3. Problems running XEmacs / weird messages,  Prev: 1. Introductory Questions,  Up: Top
  467.  
  468. 2. Compiling XEmacs
  469. *******************
  470.  
  471. * Menu:
  472.  
  473. * 2.1.::          2.1. What is the best way to compile XEmacs with the netaudio system, since I have got the netaudio system compiled but installed at a weird place, I am not root.  Also in the READMEs it does not say anything about compiling with the audioserver?
  474.  
  475. 
  476. File: xemacs-faq.info,  Node: 2.1.,  Up: 2. Compiling XEmacs
  477.  
  478. 2.1. What is the best way to compile XEmacs with the netaudio system, since I have got the netaudio system compiled but installed at a weird place, I am not root.  Also in the READMEs it does not say anything about compiling with the audioserver?
  479. ======================================================================================================================================================================================================================================================
  480.  
  481.    You should only need to add some stuff to the configure command
  482. line.  To tell it to compile in netaudio support:
  483.  
  484.      --with-sound=both
  485.  
  486.    (Or `--with-sound=nas' if you don't want native sound support for
  487. some reason.) To tell it where to find the netaudio includes and
  488. libraries:
  489.  
  490.      --site-libraries=WHATEVER
  491.      --site-includes=WHATEVER
  492.  
  493.    Then (fingers crossed) it should compile and it will use netaudio if
  494. you have a server running corresponding to the X server. The netaudio
  495. server has to be there when XEmacs starts. If the netaudio server goes
  496. away and another is run, XEmacs should cope (fingers crossed, error
  497. handling in netaudio isn't perfect).
  498.  
  499.    BTW, netaudio has been renamed as it has a name clash with something
  500. else, so if you see references to NAS or Network Audio System, it's the
  501. same thing.  It also might be found at
  502.  
  503.      ftp.x.org:/contrib/audio/nas/
  504.      ftp.ncd.com:/pub/ncd/technology/src/nas/
  505.  
  506. 
  507. File: xemacs-faq.info,  Node: 3. Problems running XEmacs / weird messages,  Next: 4. Customization - Emacs Lisp and the .emacs file,  Prev: 2. Compiling XEmacs,  Up: Top
  508.  
  509. 3. Problems running XEmacs / weird messages
  510. *******************************************
  511.  
  512. * Menu:
  513.  
  514. * 3.1.::          3.1. Help! XEmacs just crashed on me!
  515. * 3.2.::          3.2. When I try to use some particular option of some particular package, I get a cryptic error in the minibuffer.
  516. * 3.3.::          3.3. I get tons of translation table syntax error messages during startup.  How do I get rid of them?
  517. * 3.4.::          3.4. How can I avoid the startup warnings about deducing proper fonts?
  518. * 3.5.::          3.5. Help! I can not get XEmacs to display on my Envizex X-terminal!
  519. * 3.6.::          3.6. Why do I get weird messages about giftoppm and ppmdither not being found?
  520. * 3.7.::          3.7. How can I avoid those messages about deleting excess backup files?
  521. * 3.8.::          3.8. Help! XEmacs just locked up my X server on my Linux box!
  522.  
  523. 
  524. File: xemacs-faq.info,  Node: 3.1.,  Next: 3.2.,  Up: 3. Problems running XEmacs / weird messages
  525.  
  526. 3.1. Help! XEmacs just crashed on me!
  527. =====================================
  528.  
  529.    First of all, don't panic.  Whenever XEmacs crashes, it tries
  530. extremely hard to auto-save all of your files before dying. (The main
  531. time that this will not happen is if the machine physically lost power
  532. or if you killed the XEmacs process using `kill -9'.) The next time you
  533. try to edit those files, you will be informed that a more recent
  534. auto-save file exists.  You can use `M-x recover-file' to retrieve the
  535. auto-saved version of the file.
  536.  
  537.    Now, XEmacs is not perfect, and there may occasionally be times, or
  538. particular sequences of actions, that cause it to crash.  If you can
  539. come up with a reproducible way of doing this (or even if you have a
  540. pretty good memory of exactly what you were doing at the time), the
  541. maintainers would be very interested in knowing about it.  Post a
  542. message to `comp.emacs.xemacs' or send mail to `xemacs@cs.uiuc.edu'.
  543.  
  544.    If at all possible, include a stack backtrace of the core dump that
  545. was produced.  This shows where exactly things went wrong, and makes it
  546. much easier to diagnose problems.  To do this, you need to locate the
  547. core file (it's called `core', and is usually sitting in the directory
  548. that you started XEmacs from, or your home directory if that other
  549. directory was not writable).  Then, go to that directory and execute a
  550. command like
  551.  
  552.      gdb `which xemacs` core
  553.  
  554.    and then issue the command `where' to get the stack backtrace.  (You
  555. might have to use `dbx' or some similar debugger in place of `gdb'.  If
  556. you don't have any such debugger available, complain to your system
  557. administrator.)
  558.  
  559.    It's possible that a core file didn't get produced, in which case
  560. you're out of luck.  Go complain to your system administrator and tell
  561. him not to disable core files by default. (If you explicitly disabled
  562. core files, then double shame on you!)
  563.  
  564. 
  565. File: xemacs-faq.info,  Node: 3.2.,  Next: 3.3.,  Prev: 3.1.,  Up: 3. Problems running XEmacs / weird messages
  566.  
  567. 3.2. When I try to use some particular option of some particular package, I get a cryptic error in the minibuffer.
  568. ==================================================================================================================
  569.  
  570.    If you can't figure out what's going on, try typing `ESC ESC' and
  571. issuing the command
  572.  
  573.      (setq debug-on-error t)
  574.  
  575.    and then try and make the error happen again.  This will give you a
  576. backtrace that may be enlightening.  If not, try reading farther down in
  577. this FAQ; if that fails, you could try posting to `comp.emacs.xemacs'
  578. (making sure to include the backtrace) and someone may be able to help.
  579.  
  580. 
  581. File: xemacs-faq.info,  Node: 3.3.,  Next: 3.4.,  Prev: 3.2.,  Up: 3. Problems running XEmacs / weird messages
  582.  
  583. 3.3. I get tons of translation table syntax error messages during startup.  How do I get rid of them?
  584. =====================================================================================================
  585.  
  586.    There are two causes of this problem.  The first usually only strikes
  587. people using the prebuilt binaries.  The culprit in both cases is the
  588. file `XKeysymDB'.
  589.    * The binary cannot find the XKeysymDB file.  The location is
  590.      hardcoded at compile time so if the system the binary was built on
  591.      puts it a different place than your system does, you have
  592.      problems.  To fix, set the environment variable `XKEYSYMDB' to the
  593.      location of the XKeysymDB file on your system or to the location
  594.      of the one included with XEmacs which should be at:
  595.  
  596.           <xemacs_root_directory>/lib/xemacs-19.13/etc/XKeysymDB
  597.  
  598.    * The binary is finding the XKeysymDB but it is out-of-date on your
  599.      system and does not contain the necessary lines.  Either ask your
  600.      system administrator to replace it with the one which comes with
  601.      XEmacs (which is the stock R6 version and is backwards compatible)
  602.      or set your `XKEYSYMDB' variable to the location of XEmacs's
  603.      described above.
  604.  
  605. 
  606. File: xemacs-faq.info,  Node: 3.4.,  Next: 3.5.,  Prev: 3.3.,  Up: 3. Problems running XEmacs / weird messages
  607.  
  608. 3.4. How can I avoid the startup warnings about deducing proper fonts?
  609. ======================================================================
  610.  
  611.    This is highly dependent on your installation, but try with the
  612. following font as your base font for XEmacs and see what it does:
  613.  
  614.      -adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1
  615.  
  616.    More precisely, do the following in your resource file:
  617.  
  618.      Emacs.default.attributeFont: -adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1
  619.  
  620. 
  621. File: xemacs-faq.info,  Node: 3.5.,  Next: 3.6.,  Prev: 3.4.,  Up: 3. Problems running XEmacs / weird messages
  622.  
  623. 3.5. Help!  I can not get XEmacs to display on my Envizex X-terminal!
  624. =====================================================================
  625.  
  626.    Try setting the DISPLAY variable using the numeric IP address of the
  627. host you are running XEmacs from.
  628.  
  629. 
  630. File: xemacs-faq.info,  Node: 3.6.,  Next: 3.7.,  Prev: 3.5.,  Up: 3. Problems running XEmacs / weird messages
  631.  
  632. 3.6.  Why do I get weird messages about giftoppm and ppmdither not being found?
  633. ===============================================================================
  634.  
  635.    Because they are not.  You are probably trying to read some HTML
  636. files, or using W3-mode as your Web client.  To display inline
  637. pictures, this requires the above programs (which can be found in the
  638. netpbm package or its older version, pbmplus).  The netpbm package can
  639. be found at `ftp.x.org', or any of its mirror sites.  It can also be
  640. found at `ftp.cs.uiuc.edu:/pub/xemacs/aux'.
  641.  
  642. 
  643. File: xemacs-faq.info,  Node: 3.7.,  Next: 3.8.,  Prev: 3.6.,  Up: 3. Problems running XEmacs / weird messages
  644.  
  645. 3.7.  How can I avoid those messages about deleting excess backup files?
  646. ========================================================================
  647.  
  648.    Try the following Emacs-Lisp:
  649.  
  650.      (setq version-control t)
  651.      (setq kept-old-versions 0)
  652.      (setq kept-new-versions 8)
  653.      (if (string-match "XEmacs\\|Lucid" emacs-version)
  654.         (setq trim-versions-without-asking t)
  655.         (setq delete-old-versions t))
  656.  
  657. 
  658. File: xemacs-faq.info,  Node: 3.8.,  Prev: 3.7.,  Up: 3. Problems running XEmacs / weird messages
  659.  
  660. 3.8.  Help! XEmacs just locked up my X server on my Linux box!
  661. ==============================================================
  662.  
  663.    There have been several reports of the X server locking up under
  664. Linux.  In all reported cases removing speedo and scaled fonts from the
  665. font path corrected the problem.  This can be done with the command
  666. 'xset'.
  667.  
  668.    It is possible that using a font server may also solve the problem.
  669.  
  670. 
  671. File: xemacs-faq.info,  Node: 4. Customization - Emacs Lisp and the .emacs file,  Next: 5. Customization - X resources,  Prev: 3. Problems running XEmacs / weird messages,  Up: Top
  672.  
  673. 4. Customization - Emacs Lisp and the .emacs file
  674. *************************************************
  675.  
  676. * Menu:
  677.  
  678. * 4.1.::          4.1. How can `.emacs' determine which of the family of emacsen I am using?
  679. * 4.2.::          4.2. How can I detect a color display?
  680. * 4.3.::          4.3. How can I evaluate emacs-lisp expressions without switching to the *scratch* buffer?
  681. * 4.4.::          4.4. If you put (setq tab-width 6) in your `.emacs' file it does not work!  Is there a reason for this.  If you do it at the EVAL prompt it works fine!! How strange.
  682. * 4.5.::          4.5. How can I add directories to the load-path?
  683. * 4.6.::          4.6. How to check if a lisp function is defined or not?
  684. * 4.7.::          4.7.  Can I force the output of (list-faces) to a buffer other than the minibuffer since it is too wide to fit?
  685.  
  686. 
  687. File: xemacs-faq.info,  Node: 4.1.,  Next: 4.2.,  Up: 4. Customization - Emacs Lisp and the .emacs file
  688.  
  689. 4.1. How can `.emacs' determine which of the family of Emacsen I am using?
  690. ==========================================================================
  691.  
  692.    To determine if you are currently running GNU Emacs 18, GNU Emacs 19,
  693. XEmacs 19, or Epoch, and use appropriate code, check out the example
  694. given in `etc/sample.emacs'.  There are other nifty things in there as
  695. well!  Alternatively, there is a package, `emacs-vers.el', available at
  696. an Emacs-Lisp archive near you; try searching
  697.  
  698.      archive.cis.ohio-state.edu:/pub/gnu/emacs/elisp-archive/misc/
  699.  
  700. 
  701. File: xemacs-faq.info,  Node: 4.2.,  Next: 4.3.,  Prev: 4.1.,  Up: 4. Customization - Emacs Lisp and the .emacs file
  702.  
  703. 4.2. How can I detect a color display?
  704. ======================================
  705.  
  706.    You can test the return value of the function `(device-class)', as
  707. in:
  708.  
  709.      (if (eq (device-class) 'color)
  710.          (progn
  711.            (set-face-foreground  'font-lock-comment-face "Grey")
  712.            (set-face-foreground  'font-lock-string-face "Red")
  713.            ....
  714.            ))
  715.  
  716. 
  717. File: xemacs-faq.info,  Node: 4.3.,  Next: 4.4.,  Prev: 4.2.,  Up: 4. Customization - Emacs Lisp and the .emacs file
  718.  
  719. 4.3. How can I evaluate Emacs-Lisp expressions without switching to the *scratch* buffer?
  720. =========================================================================================
  721.  
  722.      (put 'eval-expression 'disabled nil)
  723.  
  724.    This sets it so that hitting `ESC ESC' lets you type a single
  725. expression to be evaluated.  This line can also be put into your
  726. `.emacs'.
  727.  
  728. 
  729. File: xemacs-faq.info,  Node: 4.4.,  Next: 4.5.,  Prev: 4.3.,  Up: 4. Customization - Emacs Lisp and the .emacs file
  730.  
  731. 4.4. If you put (setq tab-width 6) in your `.emacs' file it does not work!  Is there a reason for this.  If you do it at the EVAL prompt it works fine!! How strange.
  732. =====================================================================================================================================================================
  733.  
  734.    Use setq-default, since tab-width is all-buffer-local.
  735.  
  736. 
  737. File: xemacs-faq.info,  Node: 4.5.,  Next: 4.6.,  Prev: 4.4.,  Up: 4. Customization - Emacs Lisp and the .emacs file
  738.  
  739. 4.5. How can I add directories to the load-path?
  740. ================================================
  741.  
  742.    Here are two ways to do that, one that puts your directories at the
  743. front of the load-path, the other at the end:
  744.  
  745.      ;;; Add things at the beginning of the load-path
  746.      (setq load-path (cons "bar" load-path))
  747.      (setq load-path (cons "foo" load-path))
  748.      
  749.      ;;; Add things at the end
  750.      (setq load-path (append load-path '("foo" "bar")))
  751.  
  752. 
  753. File: xemacs-faq.info,  Node: 4.6.,  Next: 4.7.,  Prev: 4.5.,  Up: 4. Customization - Emacs Lisp and the .emacs file
  754.  
  755. 4.6. How to check if a lisp function is defined or not?
  756. =======================================================
  757.  
  758.    Use the following elisp:
  759.  
  760.      (fboundp 'foo)
  761.  
  762.    It's always a mistake, under all circumstances, to test
  763. `emacs-version' or any similar variables, in case they are not bound,
  764. unless you do the above.
  765.  
  766.    Instead, use feature-tests, such as featurep or boundp or fboundp, or
  767. even simple behavioural tests, eg  (defvar foo-old-losing-code?
  768. (condition-case nil (progn (losing-code t) nil)
  769.         (wrong-number-of-arguments t)))
  770.  
  771.    There is an incredible amount of broken code out there which could
  772. work much better more often in more places if it did the above instead
  773. of trying to divine its environment from the value of one variable.
  774.  
  775. 
  776. File: xemacs-faq.info,  Node: 4.7.,  Prev: 4.6.,  Up: 4. Customization - Emacs Lisp and the .emacs file
  777.  
  778. 4.7.  Can I force the output of (face-list) to a buffer other than the minibuffer since it is too wide to fit?
  779. ==============================================================================================================
  780.  
  781.    Evaluate the expression in the "*scratch*" buffer with point on the
  782. rightmost paren and typing `C-j'.
  783.  
  784. 
  785. File: xemacs-faq.info,  Node: 5. Customization - X resources,  Next: 6. Changing textual fonts and colors,  Prev: 4. Customization - Emacs Lisp and the .emacs file,  Up: Top
  786.  
  787. 5. Customization - X resources
  788. ******************************
  789.  
  790. * Menu:
  791.  
  792. * 5.1.::          5.1. Where is a list of X resources?
  793.  
  794. 
  795. File: xemacs-faq.info,  Node: 5.1.,  Up: 5. Customization - X resources
  796.  
  797. 5.1. Where is a list of X resources?
  798. ====================================
  799.  
  800.    Search through the NEWS file for "X Resources".  A fairly
  801. comprehensive list is given after it.
  802.  
  803.    In addition, an app-defaults file is supplied, `etc/Emacs.ad',
  804. listing the defaults.  The file `etc/sample.Xdefaults' gives a set of
  805. defaults that you might consider.  It is essentially the same as
  806. `etc/Emacs.ad' but some entries are slightly altered.  Be careful about
  807. installing the contents of this file into your `.Xdefaults'
  808. (.Xresources) file if you use FSF GNU Emacs under X11 as well.
  809.  
  810. 
  811. File: xemacs-faq.info,  Node: 6. Changing textual fonts and colors,  Next: 7. The modeline,  Prev: 5. Customization - X resources,  Up: Top
  812.  
  813. 6. Changing textual fonts and colors
  814. ************************************
  815.  
  816. * Menu:
  817.  
  818. * 6.1.::          6.1. How do I set the text, menu and modeline fonts?
  819. * 6.2.::          6.2. How can I set the background/foreground colors when highlighting a region?
  820. * 6.3.::          6.3. How can I set the most commonly used color options from my `.emacs' instead of from my `.Xdefaults'?
  821.  
  822. 
  823. File: xemacs-faq.info,  Node: 6.1.,  Next: 6.2.,  Up: 6. Changing textual fonts and colors
  824.  
  825. 6.1. How do I set the text, menu and modeline fonts?
  826. ====================================================
  827.  
  828.    Note that you should use `Emacs.' and not `Emacs*' when setting face
  829. values.
  830.  
  831.    In `.Xdefaults':
  832.  
  833.      Emacs.default.attributeFont:  -*-*-medium-r-*-*-*-120-*-*-m-*-*-*
  834.      Emacs*menubar*font:           fixed
  835.      Emacs.modeline.attributeFont: fixed
  836.  
  837.    This is confusing because modeline is a face, and can be found listed
  838. with all faces in the current mode by using M-x set-face-font (enter) ?.
  839. It uses the face specification of "attributeFont", while menubar is a
  840. normal X thing that uses the specification "font".  With Motif it may be
  841. necessary to use "fontList" instead of "font".  (Please rewrite this if
  842. you understand this better than me ...  A general description of faces
  843. would be very useful.  I am just saying that menubar is a FAQ because
  844. it's not a face and not listed.)
  845.  
  846. 
  847. File: xemacs-faq.info,  Node: 6.2.,  Next: 6.3.,  Prev: 6.1.,  Up: 6. Changing textual fonts and colors
  848.  
  849. 6.2. How can I set the background/foreground colors when highlighting a region?
  850. ===============================================================================
  851.  
  852.    You can change the face `zmacs-region' either in your `.Xdefaults':
  853.  
  854.      Emacs.zmacs-region.attributeForeground: firebrick
  855.      Emacs.zmacs-region.attributeBackground: lightseagreen
  856.  
  857.    or in your `.emacs':
  858.  
  859.      (set-face-background 'zmacs-region "red")
  860.      (set-face-foreground 'zmacs-region "yellow")
  861.  
  862. 
  863. File: xemacs-faq.info,  Node: 6.3.,  Prev: 6.2.,  Up: 6. Changing textual fonts and colors
  864.  
  865. 6.3. How can I set the most commonly used color options from my `.emacs' instead of from my `.Xdefaults'?
  866. =========================================================================================================
  867.  
  868.      (set-face-background 'default "bisque")          ; frame background
  869.      (set-face-foreground 'default "black")           ; normal text
  870.      (set-face-background 'zmacs-region "red")   ; When selecting w/
  871.                                                       ; mouse
  872.      (set-face-foreground 'zmacs-region "yellow")
  873.      (set-face-font  'default "*courier-bold-r*120-100-100*")
  874.      (set-face-background 'highlight "blue")          ; Ie when selecting buffers
  875.      (set-face-foreground 'highlight "yellow")
  876.      (set-face-background 'modeline "blue")           ; Line at bottom of buffer
  877.      (set-face-foreground 'modeline "white")
  878.      (set-face-font  'modeline "*bold-r-normal*140-100-100*")
  879.      (set-face-background 'isearch "yellow")          ; When highlighting while
  880.                                                       ; searching
  881.      (set-face-foreground 'isearch "red")
  882.      (setq x-pointer-foreground-color "black")        ; Adds to bg color,
  883.                                                       ; so keep black
  884.      (setq x-pointer-background-color "blue")         ; This is color you really
  885.                                                     ; want ptr/crsr
  886.  
  887. 
  888. File: xemacs-faq.info,  Node: 7. The modeline,  Next: 8. The keyboard,  Prev: 6. Changing textual fonts and colors,  Up: Top
  889.  
  890. 7. The modeline
  891. ***************
  892.  
  893. * Menu:
  894.  
  895. * 7.1.::          7.1. How can I make the modeline go away?
  896. * 7.2.::          7.2. How do you have XEmacs display the line number in the modeline?
  897. * 7.3.::          7.3. How do I get XEmacs to put the time of day on the modeline?
  898. * 7.4.::          7.4. How can one change the color of the modeline based on the mode used? i.e. red for C mode, green for TeX mode etc.?
  899.  
  900. 
  901. File: xemacs-faq.info,  Node: 7.1.,  Next: 7.2.,  Up: 7. The modeline
  902.  
  903. 7.1. How can I make the modeline go away?
  904. =========================================
  905.  
  906.    (set-specifier has-modeline-p nil)
  907.  
  908. 
  909. File: xemacs-faq.info,  Node: 7.2.,  Next: 7.3.,  Prev: 7.1.,  Up: 7. The modeline
  910.  
  911. 7.2. How do you have XEmacs display the line number in the modeline?
  912. ====================================================================
  913.  
  914.    Add the following line to your `.emacs' file:
  915.  
  916.      (setq line-number-mode t)
  917.  
  918. 
  919. File: xemacs-faq.info,  Node: 7.3.,  Next: 7.4.,  Prev: 7.2.,  Up: 7. The modeline
  920.  
  921. 7.3. How do I get XEmacs to put the time of day on the modeline?
  922. ================================================================
  923.  
  924.      (display-time)
  925.  
  926. 
  927. File: xemacs-faq.info,  Node: 7.4.,  Prev: 7.3.,  Up: 7. The modeline
  928.  
  929. 7.4. How can one change the color of the modeline based on the mode used? i.e. red for C mode, green for TeX mode etc.?
  930. =======================================================================================================================
  931.  
  932.    You can use something like the following:
  933.  
  934.      (add-hook 'lisp-mode-hook
  935.              '(lambda () (set-face-background 'modeline "red" (current-buffer))
  936.                          (set-face-foreground 'modeline "yellow" (current-buffer))))
  937.  
  938.    Then, when editing a Lisp file (ie went into Lisp mode), the modeline
  939. colors change from the default set in your `.emacs'.  The change will
  940. only be made in the buffer you just entered (which contains the Lisp
  941. file you are editing) and will not affect the modeline colors anywhere
  942. else.
  943.  
  944.    Notes:
  945.  
  946.    * The hook is the mode name plus "-hook". Ie c-mode-hook,
  947.      c++-mode-hook, emacs-lisp-mode-hook (ie your `.emacs' or a xx.el
  948.      file), lisp-interaction-mode-hook (the *scratch* buffer),
  949.      text-mode-hook, etc.
  950.  
  951.    * Be sure to use add-hook, not (setq c-mode-hook xxxx), otherwise
  952.      you will erase anything that anybody has already put on the hook.
  953.  
  954.    * You can also do (set-face-font 'modeline `font'), eg (set-face-font
  955.      'modeline "*bold-r-normal*140-100-100*" (current-buffer)) if you
  956.      wish the modeline font to vary based on the current mode.
  957.  
  958. 
  959. File: xemacs-faq.info,  Node: 8. The keyboard,  Next: 9. The cursor,  Prev: 7. The modeline,  Up: Top
  960.  
  961. 8. The keyboard
  962. ***************
  963.  
  964. * Menu:
  965.  
  966. * 8.1.::          8.1. What is the difference in in key sequences between XEmacs and GNU Emacs?
  967. * 8.2.::          8.2. How can I make XEmacs recognize the Alt key of my HP workstation as a Meta key?
  968. * 8.3.::          8.3. How can I stop the down-arrow-key from adding empty lines at the bottom of my buffers?
  969. * 8.4.::          8.4. I wonder if there is an interactive function that can generate "fake" keyboard events. This way, I could simply map them inside XEmacs.
  970. * 8.5.::          8.5. I am trying to bind C-. to scroll up by one line and C-; to scroll down by one line...
  971. * 8.6.::          8.6. I cannot manage to globally bind my Delete key to something other than the default.  How does one do this?
  972. * 8.7.::          8.7. How can I bind complex functions (or macros) to keys?
  973. * 8.8.::          8.8. Can the cursor keys scroll the screen a line at a time, rather than the default half page jump?  I tend it to find it disorienting.
  974. * 8.9.::          8.9. How to map "Help" key alone on Sun type4 keyboard?
  975. * 8.10.::          8.10. How can you type in special characters in XEmacs?
  976.  
  977. 
  978. File: xemacs-faq.info,  Node: 8.1.,  Next: 8.2.,  Up: 8. The keyboard
  979.  
  980. 8.1. What is the difference in in key sequences between XEmacs and GNU Emacs?
  981. =============================================================================
  982.  
  983.    The real question might be rephrased as "When should one use the
  984. quoted list, vector, or escaped string representations of key
  985. sequences?"  Is there any particular advantage to one representation
  986. over another?
  987.  
  988.    From Richard Mlynarik <mly@adoc.xerox.com>:
  989.  
  990. (meta a)
  991.      is a convenience shorthand for the sequence `[(meta a)]'.
  992.      `(global-set-key 'a 'foo)' means the same thing as
  993.      `(global-set-key '[a] 'foo)'.  It could be argued that allowing
  994.      such a shorthand just leads to sloppiness and bugs, but it's
  995.      there, and it isn't likely to go away.
  996.  
  997. [(meta a)]
  998.      is The Right Thing.  It corresponds in a one-to-one way with the
  999.      internal representation of key-sequences in keymaps.
  1000.  
  1001. [Meta-a]
  1002.      is typical FSF Emacs 19 brain damage.  As is usual, an existing,
  1003.      functional design is ignored (XEmacs) and an incompatible and
  1004.      technically worse kludge is used.
  1005.  
  1006. "\ea"
  1007.      is compatible with Emacs 18, but suffers from ASCII Seven-Bit Brain
  1008.      Damage.  I also find it harder to read.  Use this if you're trying
  1009.      to write code which works in every Emacs, but be aware that you
  1010.      can not express all Possible key-sequences (`control-9', `f1',
  1011.      etc.) using this.
  1012.  
  1013. 
  1014. File: xemacs-faq.info,  Node: 8.2.,  Next: 8.3.,  Prev: 8.1.,  Up: 8. The keyboard
  1015.  
  1016. 8.2. How can I make XEmacs recognize the Alt key of my HP workstation as a Meta key?
  1017. ====================================================================================
  1018.  
  1019.    Put the following line into a file and load it with xmodmap(1) before
  1020. starting XEmacs:
  1021.  
  1022.      remove Mod1 = Mode_switch
  1023.  
  1024. 
  1025. File: xemacs-faq.info,  Node: 8.3.,  Next: 8.4.,  Prev: 8.2.,  Up: 8. The keyboard
  1026.  
  1027. 8.3. How can I stop the down-arrow-key from adding empty lines at the bottom of my buffers?
  1028. ===========================================================================================
  1029.  
  1030.    Add the following line to your `.emacs' file:
  1031.  
  1032.      (setq next-line-add-newlines nil)
  1033.  
  1034. 
  1035. File: xemacs-faq.info,  Node: 8.4.,  Next: 8.5.,  Prev: 8.3.,  Up: 8. The keyboard
  1036.  
  1037. 8.4. I wonder if there is an interactive function that can generate "fake" keyboard events. This way, I could simply map them inside XEmacs.
  1038. ============================================================================================================================================
  1039.  
  1040.    This seems to work:
  1041.      (defun cg--generate-char-event (ch)
  1042.        "Generate an event, as if ch has been typed"
  1043.        (dispatch-event (character-to-event ch)))
  1044.      
  1045.      ;;  Backspace and Delete stuff
  1046.      (global-set-key '(backspace)
  1047.                      '(lambda () (interactive) (cg--generate-char-event 127)))
  1048.      (global-set-key '(unknown_keysym_0x4)
  1049.                      '(lambda () (interactive) (cg--generate-char-event 4)))
  1050.  
  1051. 
  1052. File: xemacs-faq.info,  Node: 8.5.,  Next: 8.6.,  Prev: 8.4.,  Up: 8. The keyboard
  1053.  
  1054. 8.5. I am trying to bind C-. to scroll up by one line and C-; to scroll down by one line...
  1055. ===========================================================================================
  1056.  
  1057.    Add the following (Thanks to Richard Mlynarik <mly@adoc.xerox.com>
  1058. and Wayne Newberry <wayne@zen.cac.stratus.com>) to `.emacs':
  1059.  
  1060.      (defun scroll-up-one-line ()
  1061.        (interactive)
  1062.        (scroll-up 1))
  1063.      
  1064.      (defun scroll-down-one-line ()
  1065.        (interactive)
  1066.        (scroll-down 1))
  1067.      
  1068.      (global-set-key [(control ?.)]   'scroll-up-one-line)        ; C-.
  1069.      (global-set-key [(control ?;)]   'scroll-down-one-line)      ; C-;
  1070.  
  1071.    The key point is that you can only bind simple functions to keys;
  1072. you can not bind a key to a function that you're also passing arguments
  1073. to.  (See <A HREF="#ss8.7">8.7 How can I bind complex functions</A> for
  1074. a better answer.)
  1075.  
  1076. 
  1077. File: xemacs-faq.info,  Node: 8.6.,  Next: 8.7.,  Prev: 8.5.,  Up: 8. The keyboard
  1078.  
  1079. 8.6. I cannot manage to globally bind my Delete key to something other than the default.  How does one do this?
  1080. ===============================================================================================================
  1081.  
  1082.      (defun Foo ()
  1083.        (interactive)
  1084.          (message "You hit DELETE"))
  1085.      
  1086.      (global-set-key "\C-?" 'Foo)
  1087.  
  1088.    However, some modes explicitly bind Delete, so you would need to add
  1089. a hook that does `local-set-key' for them.
  1090.  
  1091. 
  1092. File: xemacs-faq.info,  Node: 8.7.,  Next: 8.8.,  Prev: 8.6.,  Up: 8. The keyboard
  1093.  
  1094. 8.7. How can I bind complex functions (or macros) to keys?
  1095. ==========================================================
  1096.  
  1097.    As an example, say you want the PASTE key on a Sun keyboard to
  1098. insert the current Primary X selection at point. You can accomplish
  1099. this with:
  1100.  
  1101.      (define-key global-map 'f18 'x-insert-selection)
  1102.  
  1103.    However, this only works if there is a current X selection (the
  1104. selection will be highlighted).  The functionality I like is for the
  1105. PASTE key to insert the current X selection if there is one, otherwise
  1106. insert the contents of the clipboard.  To do this you need to pass
  1107. arguments to x-insert-selection.  This is done by wrapping the call in a
  1108. 'lambda form:
  1109.  
  1110.      (define-key global-map 'f18
  1111.        (function (lambda () (interactive) (x-insert-selection t nil))))
  1112.  
  1113.    This binds the 'f18 key to a "generic" functional object.  The
  1114. interactive spec is required because only interactive functions can be
  1115. bound to keys.  Also take a look at the doc for "function".
  1116.  
  1117.    For the FAQ example you could use:
  1118.  
  1119.      (global-set-key [(control ?.)]
  1120.              (function (lambda () (interactive) (scroll-up 1))))
  1121.      (global-set-key [(control ?;)]
  1122.                  (function (lambda () (interactive) (scroll-up -1))))
  1123.  
  1124.    This is fine if you only need a few functions within the lambda
  1125. body.  If you're doing more it's cleaner to define a separate function
  1126. as in the original FAQ example (<A HREF="#ss11.3">question 11.3</A>).
  1127.  
  1128. 
  1129. File: xemacs-faq.info,  Node: 8.8.,  Next: 8.9.,  Prev: 8.7.,  Up: 8. The keyboard
  1130.  
  1131. 8.8. Can the cursor keys scroll the screen a line at a time, rather than the default half page jump?  I tend it to find it disorienting.
  1132. ========================================================================================================================================
  1133.  
  1134.    Try this:
  1135.  
  1136.      (defun scroll-one-line-up (&optional arg)
  1137.        "Scroll the selected window up (forward in the text) one line (or N lines)."
  1138.        (interactive "p")
  1139.        (scroll-up (or arg 1)))
  1140.      
  1141.      (defun scroll-one-line-down (&optional arg)
  1142.        "Scroll the selected window down (backward in the text) one line (or N)."
  1143.        (interactive "p")
  1144.        (scroll-down (or arg 1)))
  1145.      
  1146.      (global-set-key 'up 'scroll-one-line-up)
  1147.      (global-set-key 'down  'scroll-one-line-down)
  1148.  
  1149.    The following will also work but will affect more than just the
  1150. cursor keys (i.e. C-n and C-p):
  1151.  
  1152.      (setq scroll-step 1)
  1153.  
  1154. 
  1155. File: xemacs-faq.info,  Node: 8.9.,  Next: 8.10.,  Prev: 8.8.,  Up: 8. The keyboard
  1156.  
  1157. 8.9. How to map "Help" key alone on Sun type4 keyboard?
  1158. =======================================================
  1159.  
  1160.    The following works in GNU Emacs 19:
  1161.  
  1162.      (global-set-key [help] 'help-command)          ;; Help
  1163.  
  1164.    The following works in XEmacs 19.13 with the addition of shift:
  1165.  
  1166.      (global-set-key [(shift help)] 'help-command)          ;; Help
  1167.  
  1168.    But it doesn't work alone.  This is in the file `PROBLEMS' which
  1169. should have come with your XEmacs installation:
  1170.  
  1171.    *Emacs ignores the help key when running OLWM*.
  1172.  
  1173.    OLWM grabs the help key, and retransmits it to the appropriate
  1174. client using XSendEvent.  Allowing Emacs to react to synthetic events is
  1175. a security hole, so this is turned off by default.  You can enable it by
  1176. setting the variable x-allow-sendevents to t.  You can also cause fix
  1177. this by telling OLWM to not grab the help key, with the null binding
  1178. `OpenWindows.KeyboardCommand.Help:'.
  1179.  
  1180. 
  1181. File: xemacs-faq.info,  Node: 8.10.,  Prev: 8.9.,  Up: 8. The keyboard
  1182.  
  1183. 8.10. How can you type in special characters in XEmacs?
  1184. =======================================================
  1185.  
  1186.    One way is to use the package `x-compose'.  Then you can use
  1187. sequences like `Compose " a' to get d (a-umlaut), etc.
  1188.  
  1189. 
  1190. File: xemacs-faq.info,  Node: 9. The cursor,  Next: 10. The mouse; cutting and pasting,  Prev: 8. The keyboard,  Up: Top
  1191.  
  1192. 9. The cursor
  1193. *************
  1194.  
  1195. * Menu:
  1196.  
  1197. * 9.1.::          9.1. Is there a way to make the bar cursor a little thicker than one-pixel thick since I lose it?
  1198. * 9.2.::          9.2. On the same subject - is there a way to get back the old "block" cursor where the cursor covers the character in front of the point?
  1199.  
  1200. 
  1201. File: xemacs-faq.info,  Node: 9.1.,  Next: 9.2.,  Up: 9. The cursor
  1202.  
  1203. 9.1. Is there a way to make the bar cursor a little thicker than one-pixel thick since I lose it?
  1204. =================================================================================================
  1205.  
  1206.    For a 1 pixel bar cursor, use:
  1207.  
  1208.      (setq bar-cursor t)
  1209.  
  1210.    For a 2 pixel bar cursor, use:
  1211.  
  1212.      (setq bar-cursor 'anything-else)
  1213.  
  1214.    You can use a color to make it stand out better:
  1215.  
  1216.      Emacs*cursorColor:    Red
  1217.  
  1218. 
  1219. File: xemacs-faq.info,  Node: 9.2.,  Prev: 9.1.,  Up: 9. The cursor
  1220.  
  1221. 9.2. On the same subject - is there a way to get back the old "block" cursor where the cursor covers the character in front of the point?
  1222. =========================================================================================================================================
  1223.  
  1224.      (setq bar-cursor nil)
  1225.  
  1226. 
  1227. File: xemacs-faq.info,  Node: 10. The mouse; cutting and pasting,  Next: 11. Highlighting,  Prev: 9. The cursor,  Up: Top
  1228.  
  1229. 10. The mouse; cutting and pasting
  1230. **********************************
  1231.  
  1232. * Menu:
  1233.  
  1234. * 10.1.::          10.1. I keep hitting the middle mouse button by accident and getting stuff pasted into my buffer so how can I turn this off?
  1235. * 10.2.::          10.2. How do I set control/meta/etc modifiers on mouse buttons?
  1236. * 10.3.::          10.3. I do "^x ^b" to get a list of buffers and the entries get highlighted when I move the mouse over them but clicking the left mouse does not do anything.
  1237. * 10.4.::          10.4. How can I get a list of buffers to popup when I hit button 3 on the mouse?
  1238. * 10.5.::          10.5. Why does cut-and-paste not work between XEmacs and a cmdtool?
  1239. * 10.6.::          10.6. How I can set XEmacs up so that it pastes where the cursor is _not_ where the pointer lies?
  1240. * 10.7.::          10.7. How do I select a rectangular region?
  1241. * 10.8.::          10.8. Why does M-w take so long?
  1242.  
  1243.